<?php



defined('BASEPATH') OR exit('No direct script access allowed');

include 'linkdatabase.php';
include 'findInDatabase.php';


class Userinfo extends CI_Controller {
  public function index(){
		
		$openId=$_GET['openId'];

		$data=array();
    // $item=array('title','author','fprice','price','date','image','status','sellername','contect','contectId');

    $link = linkdatabase::link();
    @mysqli_select_db($link, "book");

		
    $sql="SELECT * FROM user WHERE `open_id`='$openId'";
		$result = mysqli_query($link, $sql);
		$row= mysqli_fetch_assoc($result);
		$data['contect']=$row['contact'];
		$data['contectId']=$row['contactId'];
		

		header(	'Content-Type:text/json');
		echo json_encode($data);
			
		


			

  }
}

